<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<input id="id" name="id" value="${user.id}" type="hidden"/>
<div class="form-group">
    <label class="col-sm-3 control-label">登陆账号：</label>
    <div class="col-sm-8">
        <input id="userAccount" name="userAccount" value="${user.userAccount}" type="text" class="form-control" required>
    </div>
</div>
<div class="form-group">
    <label class="col-sm-3 control-label">账号名称：</label>
    <div class="col-sm-8">
        <input id="userName" name="userName" value="${user.userName}" type="text" class="form-control" required>
    </div>
</div>

<div class="form-group">
    <label class="col-sm-3 control-label">分配角色：</label>
    <div class="col-sm-8 checkbox checkbox-success">
        <c:if test="${not empty roleList}">
            <c:forEach items="${roleList}" var="role" varStatus="status">
                <c:set var="isHasRole" value="false"></c:set>
                <c:forEach items="${user.systemRoleSet}" var="srole">
                    <c:if test="${srole.id == role.id}">
                        <c:set var="isHasRole" value="true"></c:set>
                    </c:if>
                </c:forEach>
                <input <c:if test="${isHasRole}">checked</c:if> style="margin-left: 0px;margin-top: 0px;" name="roleName" id="roleName_${status.index}" value="${role.id}" type="checkbox"/><label for="roleName_${status.index}" >${role.roleDescription}</label><br />
            </c:forEach>
        </c:if>
    </div>
</div>